<script>
$(document).ready(function(){
    $("#rein-sTable").tablesorter();
    $("#rein-sTable tbody tr").click(function(){
    	var tds = $(this).children();
		var sn = $(this).attr('id');
		setReinData(sn);
		$("#reinForm").attr('action','<?php echo $this->route('rein-edit')?>');
    });

    $('#rein-sTable tbody tr').closeDOMWindow({eventType:'click'});

    $("#rein-sTable tbody tr").mouseover(function() {
		$(this).addClass("trover");}).mouseout(function() {
			$(this).removeClass("trover");});

});

</script>
<table id="rein-sTable" class="tablesorter">
<thead><tr>
	<th>#</th>
	<th><?php echo $this->translate('date')?></th>
	<th><?php echo $this->translate('student_id')?></th>
	<th><?php echo $this->translate('name')?></th>
	<th><?php echo $this->translate('class_sn')?></th>
	<th><?php echo $this->translate('number')?></th>
	<th><?php echo $this->translate('sex')?></th>
	<th><?php echo $this->translate('approve_organ')?></th>
</tr></thead>
<tbody>
<?php $i=0;?>
<?php foreach($this->data as $val):?>
<tr id="<?php echo $val['sn']?>">
	<td><?php echo ++$i?></td>
	<td><?php echo $val['date']?></td>
	<td><?php echo $val['student_id']?></td>
	<td><?php echo $val['name']?></td>
	<td><?php echo sprintf("%d%02d",$val['grade'] ,$val['class_sn'])?></td>
	<td><?php echo $val['number']?></td>
	<td><?php echo $val['sex']?></td>
	<td><?php echo $val['approve_organ']?></td>
</tr>
<?php endforeach?>
</tbody>
</table>
